package com.boot.repository;

import com.boot.entity.TeaInfo;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

@Transactional
@Repository
public interface TeaInfoRepository extends JpaRepository<TeaInfo, Integer>, JpaSpecificationExecutor<TeaInfo> {

    List<TeaInfo> findAllByNameLike(String name);
    List<TeaInfo> findAllByWorkNumber(String w);


    Boolean existsByWorkNumber(String worknum);

    TeaInfo findByWorkNumber(String workNumber);

    TeaInfo findByWorkNumberAndPassword(String workNumber, String password);

}